package oneD.test;

import oneD.fem.structure.Truss;
import oneD.models.SmallTetraeder;
import inf.text.ArrayFormat;

public class EnumerateTest2 {
	public static void main(String[] args) {
		Truss struct = SmallTetraeder.createStructure();
		// solve
		struct.solve();
		// print equation numbers
		System.out.println(" Node degrees of freedom");
		for (int i = 0; i < struct.getNumberOfNodes(); i++) {
			int[] dofNumbers = struct.getNode(i).getDOFNumbers();
			System.out.println(ArrayFormat.format(dofNumbers));
		}
		System.out.println(" Element degrees of freedom");
		for (int i = 0; i < struct.getNumberOfElements(); i++) {
			int[] dofNumbers = struct.getElement(i).getDOFNumbers();
			System.out.println(ArrayFormat.format(dofNumbers));
		}
	}
}